<template>
    <Header />
    <div class="roomBody-phone hidden-sm-and-up">
        <div class="roomImgs">
            <el-carousel height="300px" interval="5000" style="border-radius: 10px 10px 0 0;">
                <el-carousel-item v-for="(item, index) in swiperList" :key="index">
                    <img class="swiper-image"
                        src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" alt="">
                    <!-- {{ item.src }} -->
                </el-carousel-item>
            </el-carousel>
        </div>
        <div style="background-color: #fff;border-radius: 0 0 10px 10px;">
            <div class="roomName">
                君悦客房 双床房
            </div>
            <div class="roomIntro">
    
                <div class="intro-title">
                    基本信息
                </div>
                <div class="room-info">
                    <div class="room-info-item">
                        床型: 2张1.5m大床
                    </div>
                    <div class="room-info-item">
                        面积: 68㎡
                    </div>
                    <div class="room-info-item">
                        窗户: 有窗
                    </div>
                    <div class="room-info-item">
                        房型特色: 宽敞现代的68平米客房，拥有全景落地玻璃窗坐赏度假村景观及海棠湾山景。房间配备各种特色设施，包含宽大浴缸，用餐区，办公区及配有舒适躺椅的独立阳台。
                    </div>
                    <div class="room-remark">
                        <div class="remark-title">取消规则</div>
                        <div class="remark-content">在线付：不可取消</div>
                        <div class="remark-title">费用明细</div>
                        <div class="remark-content">房费：晚/元 ￥2015/晚</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yudin-info">
            <div class="room-yudinitem" v-for="(item, index) in 2" :key="index">
                <div class="zaocan">
                    <el-popover placement="top-start" title="Title" :width="200" trigger="hover"
                        content="this is content, this is content, this is content">
                        <template #reference>
                            <span class="blueText"
                                style="border-bottom: 1px dashed #d8d8d8;cursor: pointer;">2份早餐 </span>
                        </template>
                    </el-popover>

                    <span style="margin: 0 10px;"> | </span>
                    <el-popover placement="top-start" title="Title" :width="200" trigger="hover"
                        content="this is content, this is content, this is content">
                        <template #reference>
                            <span class="blueText"
                                style="border-bottom: 1px dashed #d8d8d8;cursor: pointer;color:#3D3D3D">
                                不可取消</span>
                        </template>
                    </el-popover>

                </div>
                <div class="right-yudin">
                    <div class="price">
                        <div class="price-contaienr">
                            <span style="color:#356CEB">¥</span>
                            <span class="real-price">637</span>
                            <span>起</span>
                        </div>
                        <div class="menshijia">
                            门市价: ￥ 2000
                        </div>
                    </div>
                    <div>
                        <el-button type="primary">预订</el-button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="roomBody hidden-xs-only">
        <div class="roomImgs">
            <div class="roomName">
                君悦客房 双床房
            </div>
            <el-carousel height="400px" interval="5000">
                <el-carousel-item v-for="(item, index) in swiperList" :key="index">
                    <img class="swiper-image"
                        src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" alt="">
                    <!-- {{ item.src }} -->
                </el-carousel-item>
            </el-carousel>
        </div>
        <div class="roomIntro">
            <el-scrollbar height="400px">
                <div class="intro-title">
                    基本信息
                </div>
                <div class="room-info">
                    <div class="room-info-item">
                        床型: 2张1.5m大床
                    </div>
                    <div class="room-info-item">
                        面积: 68㎡
                    </div>
                    <div class="room-info-item">
                        窗户: 有窗
                    </div>
                    <div class="room-info-item">
                        房型特色: 宽敞现代的68平米客房，拥有全景落地玻璃窗坐赏度假村景观及海棠湾山景。房间配备各种特色设施，包含宽大浴缸，用餐区，办公区及配有舒适躺椅的独立阳台。
                    </div>
                    <div class="room-remark">
                        <div class="remark-title">取消规则</div>
                        <div class="remark-content">在线付：不可取消</div>
                        <div class="remark-title">费用明细</div>
                        <div class="remark-content">房费：晚/元 ￥2015/晚</div>
                    </div>
                </div>
            </el-scrollbar>
            <div>
                <el-button type="primary" size="large" color="#356CEB">选择房间</el-button>
            </div>
        </div>
    </div>
</template>
<script lang="ts" setup>
    import Header from '@/components/Header.vue'
    const swiperList = [
        {
            id: 1,
            src: '../static/s1.jpg'
        },
        {
            id: 2,
            src: '../static/s2.jpg'
        },
        {
            id: 3,
            src: '../static/s3.jpg'
        },
        {
            id: 4,
            src: '../static/image.png'
        }
    ]
</script>
<style lang="scss">
    @import '@/assets/variables.scss';

    .roomBody-phone {
        display: flex;
        color: #3D3D3D;
        background-color: #F4F4F4;
        align-items: center;
        padding: 20px;
        flex-direction: column;
        max-width: $primary-max-width;
        margin: 0px auto;

        .roomName {
            font-size: 26px;
            font-weight: bold;
            padding: 0 12px;
            margin-top: 20px;
            text-align: left;
        }

        .roomImgs {
            width: 100%;
        }
        .yudin-info {
            margin-top: 20px;
            border-radius: 10px;
            width: 100%;
            background-color: #fff;
                        padding: 0 12px;
                        font-size: 14px;
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: center;



                        .room-yudinitem {
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                            width: 100%;
                            border-bottom: 1px solid #d8d8d8;
                            min-height: 80px;

                            .zaocan {
                                display: flex;
                                align-items: center;

                                color: #356CEB;
                            }

                            .right-yudin {
                                display: flex;
                                align-items: center;

                                .price {
                                    margin-right: 10px;
                                    display: flex;
                                    flex-direction: column;
                                    align-items: center;
                                    justify-content: center;

                                    .price-contaienr {

                                        .real-price {
                                            color: #356CEB;
                                            font-size: 24px;
                                            font-weight: 600;
                                            margin: 0px 5px;
                                        }
                                    }

                                    .menshijia {
                                        color: #ccc;
                                        font-size: 12px;
                                        text-decoration: line-through;
                                    }
                                }
                            }
                        }

                        .room-yudinitem:last-child {
                            border-bottom: none;
                        }
                    }

        .roomIntro {
            padding: 12px;
            .intro-title {
                font-size: 20px;
                font-weight: bold;
                margin-bottom: 20px;
                /* 添加一个伪类给标题前面加一个小的蓝色条 */

            }

            .room-info {

                .room-info-item {
                    margin-bottom: 10px;
                    margin-left: 20px;
                }


                .room-remark {
                    margin-top: 20px;

                    .remark-title {
                        font-size: 20px;
                        margin-bottom: 20px;

                    }

                    .remark-title::before {
                        content: '';
                        display: inline-block;
                        width: 3px;
                        height: 15px;
                        background-color: #356CEB;
                        margin-right: 15px;
                    }

                    .remark-content {
                        margin-bottom: 20px;
                        margin-left: 20px;

                    }

                }
            }

        }

    }

    .roomBody {
        display: flex;
        color: #3D3D3D;
        align-items: center;
        justify-content: space-between;
        max-width: $primary-max-width;
        margin: 30px auto;

        .roomName {
            font-size: 26px;
            font-weight: bold;
            margin-bottom: 20px;
        }

        .roomImgs {
            width: 50%;
        }

        .roomIntro {
            width: 40%;

            .intro-title {
                font-size: 20px;
                font-weight: bold;
                margin-bottom: 20px;
            }

            .room-info {

                .room-info-item {
                    margin-bottom: 10px;
                    margin-left: 20px;
                }

                .room-remark {
                    margin-top: 20px;

                    .remark-title {
                        font-size: 20px;
                        margin-bottom: 20px;

                    }

                    .remark-content {
                        margin-bottom: 20px;
                        margin-left: 20px;

                    }

                }
            }

        }

    }
</style>